package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.model.Blog;
import com.yami.shop.bean.model.UserBrowseHistory;
import com.yami.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wxf
 * @date 2023/5/16 17:55
 */
public interface UserBrowseHistoryMapper extends BaseMapper<UserBrowseHistory> {

    /**
     *  通过用户id、商品id以及收藏类型删除数据
     *
     * @param userId
     * @param type
     * @param ids
     */
    void deteleByUserIdAndProdId(@Param("userId") String userId, @Param("type") String type, @Param("ids") List<Long> ids);

    /**
     *  查询用户历史浏览记录
     *
     * @param page
     * @param currentId
     * @param content
     * @return
     */
    IPage<Blog> pageUserBrowseHistory(PageParam<Blog> page, @Param("currentId") String currentId, @Param("content") String content);
}
